From 76ea19790f67ffeb82d095429ef11406a1091a4d Mon Sep 17 00:00:00 2001 From: "kaf24@freefall.cl.cam.ac.uk" Date: Mon, 20 Sep 2004 10:49:48 +0000 Subject: [PATCH] bitkeeper revision 1.1159.79.5 (414eb5ccBh7RW8Eo9mCc8WaCqLx0Kg) Ensure we get output from C extensions via stdout/stderr, by disabling default stream buffering. --- tools/python/xen/lowlevel/xc/xc.c | 4 ++++ tools/python/xen/lowlevel/xu/xu.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 840a954e94..9d73b04114 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -1320,4 +1320,8 @@ PyMODINIT_FUNC initxc(void) PyDict_SetItemString(d, "error", xc_error); zero = PyInt_FromLong(0); + + /* KAF: This ensures that we get debug output in a timely manner. */ + setbuf(stdout, NULL); + setbuf(stderr, NULL); } diff --git a/tools/python/xen/lowlevel/xu/xu.c b/tools/python/xen/lowlevel/xu/xu.c index f31d54b527..7bf82e483a 100644 --- a/tools/python/xen/lowlevel/xu/xu.c +++ b/tools/python/xen/lowlevel/xu/xu.c @@ -1438,4 +1438,8 @@ PyMODINIT_FUNC initxu(void) d = PyModule_GetDict(m); port_error = PyErr_NewException(XENPKG ".PortError", NULL, NULL); PyDict_SetItemString(d, "PortError", port_error); + + /* KAF: This ensures that we get debug output in a timely manner. */ + setbuf(stdout, NULL); + setbuf(stderr, NULL); } -- 2.30.2